package com.xnyzc.lhy.order.mapper.user.message;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xnyzc.lhy.order.entity.dictionaries.OaSysDict;
import com.xnyzc.lhy.order.entity.param.cms.PageDto;
import com.xnyzc.lhy.order.entity.param.user.message.DriverMessageParam;
import com.xnyzc.lhy.order.entity.user.message.OaSysMessage;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 用户-消息 Mapper 接口
 * </p>
 *
 * @author bin
 * @since 2019-07-19
 */
public interface OaSysMessageMapper extends BaseMapper<OaSysMessage> {

    Integer queryMessageCount(@Param("driverId") Long driverId);

    DriverMessageParam querySystemMessage(@Param("value") String value, @Param("driverId") Long driverId);

    List<OaSysMessage> queryMessageDate(DriverMessageParam driverMessageParam);

    /**
     * 首页获取未读消息
     * @param driverMessageParam 司机ID和分页
     * @return
     */
    List<Map<String, Object>> queryNewMessage(DriverMessageParam driverMessageParam);

    /**
     * 查询消息标题
     */
    Map<String, String> selectMessageTitle(@Param("pushCode") String pushCode);

}
